<%--
  Created by IntelliJ IDEA.
  User: jiusan
  Date: 21.10.19
  Time: 15:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
    <meta name="generator" content="Hugo 0.80.0">
    <title>豪哥商城</title>

    <link rel="canonical" href="https://getbootstrap.com/docs/4.6/examples/dashboard/">


    <!-- Bootstrap core CSS -->
    <link href="/static/bootstrap4/css/bootstrap.min.css" rel="stylesheet">


    <style>
        .bd-placeholder-img {
            font-size: 1.125rem;
            text-anchor: middle;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }

        @media (min-width: 768px) {
            .bd-placeholder-img-lg {
                font-size: 3.5rem;
            }
        }
    </style>


    <!-- Custom styles for this template -->
    <link href="/static/css/dashboard.css" rel="stylesheet">
</head>
<body>
<nav class="navbar navbar-dark sticky-top bg-dark flex-md-nowrap p-0 shadow">
    <a class="navbar-brand col-md-3 col-lg-2 mr-0 px-3" href="#">Company name</a>
    <button class="navbar-toggler position-absolute d-md-none collapsed" type="button" data-toggle="collapse"
            data-target="#sidebarMenu" aria-controls="sidebarMenu" aria-expanded="false" aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>
    <input class="form-control form-control-dark w-100" type="text" placeholder="Search" aria-label="Search">
    <ul class="navbar-nav px-3">
        <li class="nav-item text-nowrap">
            <a class="nav-link" href="#">Sign out</a>
        </li>
    </ul>
</nav>

<div class="container-fluid">
    <div class="row">
        <nav id="sidebarMenu" class="col-md-3 col-lg-2 d-md-block bg-light sidebar collapse">
            <div class="sidebar-sticky pt-3">
                <ul class="nav flex-column">
                    <li class="nav-item">
                        <a class="nav-title nav-link" href="#" onclick="toSon('/brand/list/1/5','品牌管理',this)">
                            品牌管理
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-title nav-link" href="#" onclick="toSon('/category/list','分类管理',this)">
                            分类管理
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-title nav-link" href="#" onclick="toSon()">
                            规格管理
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-title nav-link" href="#" onclick="toSon()">
                            SPU管理
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-title nav-link" href="#" onclick="toSon()">
                            SKU管理
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-title nav-link" href="#" onclick="toSon()">
                            用户管理
                        </a>
                    </li>
                </ul>


            </div>
        </nav>

        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-md-4">
            <div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
                <h1 class="h2" id="title"></h1>
                <div class="btn-toolbar mb-2 mb-md-0">
                    <div class="btn-group mr-2">
                        <button type="button" class="btn btn-sm btn-outline-secondary">Share</button>
                        <button type="button" class="btn btn-sm btn-outline-secondary">Export</button>
                    </div>
                    <button type="button" class="btn btn-sm btn-outline-secondary dropdown-toggle">
                        <span data-feather="calendar"></span>
                        This week
                    </button>
                </div>
            </div>
            <div id="content">

            </div>
        </main>
    </div>
</div>


<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"
        integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
        crossorigin="anonymous"></script>
<script>window.jQuery || document.write('<script src="/static/js/jquery-3.2.1.js"><\/script>')</script>
<script src="/static/bootstrap4/js/bootstrap.bundle.min.js"></script>
<script src="/static/js/jquery-3.2.1.js"></script>


<script src="https://cdn.jsdelivr.net/npm/feather-icons@4.28.0/dist/feather.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.9.4/dist/Chart.min.js"></script>
<script >
    function  toSon(url,title,docment){
        $("#content").load(url)
        $("#title").html(title)
        // 遍历清楚所有的active属性
        $(".nav-title").each(function (index){
            $(this).attr("class","nav-title nav-link")
        })
        // 给当前元素添加active属性
        $(docment).attr("class","nav-title nav-link active")
    }

</script>
</body>
</html>
